﻿#VisualFreeBasic_Form#  Version=5.6.1
Locked=0

[Form]
Name=Form1
ClassStyle=CS_VREDRAW,CS_HREDRAW,CS_DBLCLKS
ClassName=
WinStyle=WS_THICKFRAME,WS_CAPTION,WS_SYSMENU,WS_MINIMIZEBOX,WS_MAXIMIZEBOX,WS_CLIPSIBLINGS,WS_CLIPCHILDREN,WS_VISIBLE,WS_EX_WINDOWEDGE,WS_EX_CONTROLPARENT,WS_EX_LEFT,WS_EX_LTRREADING,WS_EX_RIGHTSCROLLBAR,WS_POPUP,WS_SIZEBOX
Style=3 - 常规窗口
Icon=
Caption=Form1
StartPosition=1 - 屏幕中心
WindowState=0 - 正常
Enabled=True
Repeat=False
Left=0
Top=0
Width=555
Height=723
TopMost=False
Child=False
MdiChild=False
TitleBar=True
SizeBox=True
SysMenu=True
MaximizeBox=True
MinimizeBox=True
Help=False
Hscroll=False
Vscroll=False
MinWidth=0
MinHeight=0
MaxWidth=0
MaxHeight=0
NoActivate=False
MousePass=False
TransPer=0
TransColor=SYS,25
Shadow=0 - 无阴影
BackColor=SYS,15
MousePointer=0 - 默认
Tag=
Tab=True
ToolTip=
ToolTipBalloon=False
AcceptFiles=False

[Picture]
Name=Picture1
Index=-1
Style=0 - 无边框
Enabled=True
Visible=True
Left=4
Top=5
Width=533
Height=676
Layout=0 - 不锚定
MousePointer=0 - 默认
Tag=
Tab=True
ToolTip=
ToolTipBalloon=False
AcceptFiles=False


[AllCode]
'这是标准的工程模版，你也可做自己的模版。
'写好工程，复制全部文件到VFB软件文件夹里【template】里即可，子文件夹名为 VFB新建工程里显示的名称
'快去打造属于你自己的工程模版吧。
Function Form1_Picture1_WM_Paint(hWndForm As hWnd ,hWndControl As hWnd) As LResult '重绘，系统通知控件需要重新绘画。
   Dim gg As yGDI = yGDI(hWndControl ,GetSysColor(COLOR_BTNFACE) ,True)
   
   Dim As Long x ,y ,i ,w ,h
   FF_Control_GetSize hWndControl ,w ,h
   w = Int(w / 45)
   h = Int(h / 45)
   i = &HF022
   For y = 0 To h -1
      For x = 0 To w -1
         i += 1
         gg.Font "MT Extra" ,20
         gg.SetColor &H000000
         gg.DrawString x * 45 + 5 ,y * 45 + 5 ,WString(1 ,i)
         gg.Font "微软雅黑"
         gg.SetColor &HFF0000
         gg.DrawString x * 45 + 5 ,y * 45 + 33 ,"&H" & Hex(i)
      Next
   Next
   
   Function = TRUE ' 告诉系统，我们自绘了（yGDI必须WM_PAINT初始化，若API必须用BeginPaint初始化），不需要系统绘画。
End Function

Sub Form1_Shown(hWndForm As hWnd ,UserData As Integer) '窗口完全显示后。UserData 来自显示窗口最后1个参数。
   Dim b  As String = GetResourceStr("FONT_MTEXTRA")
   Dim uu As Long
   Dim ff As Any Ptr = AddFontMemResourceEx(StrPtr(b) ,Len(b) ,0 ,@uu)
End Sub





